package itheima.com.d03_hashmap;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Test {
    public static void main(String[] args) {
        HashMap<Students, String> hm = new HashMap<>();
        hm.put(new Students("小王", 18, "男"), "北京");
        hm.put(new Students("小李", 18, "男"), "上海");
        hm.put(new Students("小张", 18, "男"), "广州");

        Set<Map.Entry<Students, String>> entries = hm.entrySet();
        for (Map.Entry<Students, String> entry : entries) {
            System.out.println(entry.getKey() + "--" + entry.getValue());
        }

    }
}
